package com.chen.palmar.entity;

import android.text.TextUtils;

import java.util.List;

/**
 * @author Chen
 * @date 2018/1/2
 * 功能描述：
 */

public class HomeInfoEntity {

    /**
     * resultCode : 1000
     * message : null
     * error : null
     * data : [{"articleId":57,"title":"动态1","img":"http://garden-upload.hulianjiating.com/upload/app/default/avatarServant.jpeg","content":"动态内容内容内容","user_name":"新昵称","user_avatar":"","create_at":"2017-12-26 00:00","type":1,"address_detail":null}]
     * dataReserve1 : null
     * dataReserve2 : null
     * rows : null
     * page : 1
     * total : 1
     * records : 1
     * pager : {"pageNo":1,"pageSize":10,"totalRecord":1,"totalPage":1,"results":null,"params":{}}
     * navigatePageNumbers : null
     */

    private int resultCode;
    private String message;
    private String error;
    private String dataReserve1;
    private String dataReserve2;
    private String rows;
    private int page;
    private int total;
    private int records;
    private PagerBean pager;
    private String navigatePageNumbers;
    private List<DataBean> data;

    public int getResultCode() {
        return resultCode;
    }

    public void setResultCode(int resultCode) {
        this.resultCode = resultCode;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public String getError() {
        return error;
    }

    public void setError(String error) {
        this.error = error;
    }

    public String getDataReserve1() {
        return dataReserve1;
    }

    public void setDataReserve1(String dataReserve1) {
        this.dataReserve1 = dataReserve1;
    }

    public String getDataReserve2() {
        return dataReserve2;
    }

    public void setDataReserve2(String dataReserve2) {
        this.dataReserve2 = dataReserve2;
    }

    public String getRows() {
        return rows;
    }

    public void setRows(String rows) {
        this.rows = rows;
    }

    public int getPage() {
        return page;
    }

    public void setPage(int page) {
        this.page = page;
    }

    public int getTotal() {
        return total;
    }

    public void setTotal(int total) {
        this.total = total;
    }

    public int getRecords() {
        return records;
    }

    public void setRecords(int records) {
        this.records = records;
    }

    public PagerBean getPager() {
        return pager;
    }

    public void setPager(PagerBean pager) {
        this.pager = pager;
    }

    public String getNavigatePageNumbers() {
        return navigatePageNumbers;
    }

    public void setNavigatePageNumbers(String navigatePageNumbers) {
        this.navigatePageNumbers = navigatePageNumbers;
    }

    public List<DataBean> getData() {
        return data;
    }

    public void setData(List<DataBean> data) {
        this.data = data;
    }

    public static class PagerBean {
        /**
         * pageNo : 1
         * pageSize : 10
         * totalRecord : 1
         * totalPage : 1
         * results : null
         * params : {}
         */

        private int pageNo;
        private int pageSize;
        private int totalRecord;
        private int totalPage;
        private String results;
        private ParamsBean params;

        public int getPageNo() {
            return pageNo;
        }

        public void setPageNo(int pageNo) {
            this.pageNo = pageNo;
        }

        public int getPageSize() {
            return pageSize;
        }

        public void setPageSize(int pageSize) {
            this.pageSize = pageSize;
        }

        public int getTotalRecord() {
            return totalRecord;
        }

        public void setTotalRecord(int totalRecord) {
            this.totalRecord = totalRecord;
        }

        public int getTotalPage() {
            return totalPage;
        }

        public void setTotalPage(int totalPage) {
            this.totalPage = totalPage;
        }

        public String getResults() {
            return results;
        }

        public void setResults(String results) {
            this.results = results;
        }

        public ParamsBean getParams() {
            return params;
        }

        public void setParams(ParamsBean params) {
            this.params = params;
        }

        public static class ParamsBean {
        }
    }

    public static class DataBean {
        /**
         * articleId : 57
         * title : 动态1
         * img : http://garden-upload.hulianjiating.com/upload/app/default/avatarServant.jpeg
         * content : 动态内容内容内容
         * user_name : 新昵称
         * user_avatar :
         * create_at : 2017-12-26 00:00
         * type : 1
         * address_detail : null
         */

        private int articleId;
        private String title;
        private String img;
        private String content;
        private String user_name;
        private String user_avatar;
        private String create_at;
        private int type;
        private String address_detail;

        public int getArticleId() {
            return articleId;
        }

        public void setArticleId(int articleId) {
            this.articleId = articleId;
        }

        public String getTitle() {
            return title;
        }

        public void setTitle(String title) {
            this.title = title;
        }

        public String getImg() {
            return img;
        }

        public void setImg(String img) {
            this.img = img;
        }

        public String getContent() {
            return content;
        }

        public void setContent(String content) {
            this.content = content;
        }

        public String getUser_name() {
            return user_name;
        }

        public void setUser_name(String user_name) {
            this.user_name = user_name;
        }

        public String getUser_avatar() {
            return user_avatar;
        }

        public void setUser_avatar(String user_avatar) {
            this.user_avatar = user_avatar;
        }

        public String getCreate_at() {
            return create_at;
        }

        public void setCreate_at(String create_at) {
            this.create_at = create_at;
        }

        public int getType() {
            return type;
        }

        public void setType(int type) {
            this.type = type;
        }

        public String getAddress_detail() {
            return address_detail;
        }

        public void setAddress_detail(String address_detail) {
            this.address_detail = address_detail;
        }

        @Override
        public String toString() {
            if (!TextUtils.isEmpty(content)) {
                return content;
            }
            return super.toString();
        }
    }
}
